import { redirect } from "next/navigation";
import ProLayout from "~/components/layouts/ProLayout";
import { getServerAuthSession } from "~/server/auth";

export default async function DashboardLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  const session = await getServerAuthSession();

  if (!session) {
    redirect("/login");
  }

  return <ProLayout>{children}</ProLayout>;
} 